<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PM-Enjoy</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta name="format-detection" content="email=no"/>
    <!-- 强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no" />
    <meta name="applicable-device" content="mobile">
    <meta name="apple-itunes-app" content="app-id=921839681">
    <link rel="stylesheet" href="<?php  echo $this->config->webRoot; ?>theme/default/mweb/mine.css">
    <link rel="stylesheet" href="<?php  echo $this->config->webRoot; ?>js/layui/css/layui.mobile.css">
    <script src="<?php  echo $this->config->webRoot; ?>js/jquery/lib.js"></script>
    <script src="<?php  echo $this->config->webRoot; ?>js/layui/layui.all.js"></script>
    <script src="<?php  echo $this->config->webRoot; ?>js/swipper/swiper.min.js"></script>
    <link rel="stylesheet" href="<?php  echo $this->config->webRoot; ?>js/swipper/swiper.min.css"">
</head>

<style>
    .content_project{
        height: 29px;
        padding-left: 50px;
        line-height: 30px;
        font-size: 10px;
        color: #ccc;
    }

    .content_box{
        border-bottom: none;
    }
    .layui-layer-loading{
        z-index: 9999;
    }


    .layui-inline{
        width: 100%;
    }
    .layui-laydate-header{
        width: 98vw;
    }
    .layui-laydate-content{
        width: 100%;
    }
    .layui-laydate-main{
        width: 100%;
    }
    .layui-laydate-content>table{
        width: 100%;
    }
    .layui-laydate-content tr{
        text-align: center;
    }
    .layui-laydate{
        border: none !important;
        width: 100%;
    }
    tr{
        height: 38px;
    }
    .laydate-day-mark::after{
        right: 43% !important;
        top: 26px !important;
        width: 8px !important;
        height: 8px !important;
    }
    .layui-layer-loading2{
        margin: 0 auto;
    }
    .now{
        background: antiquewhite;
        border-radius: 5px;
    }
    .thumb{

    }
</style>
<body>
<div class="swiper-container" id="banner">
    <div class="thumb-list nav">
        <div class="thumb active" id="thumb1">
            <span>近期</span>
            <div class="nav_right_bottom"></div>
        </div>
        <div class="thumb" id="thumb2">
            <span>任务</span>
            <div class="nav_right_bottom"></div>
            <div class="nav_demo_select"><span>所有任务</span><i class="layui-icon icon_sty">&#xe61a;</i></div>
            <ul class="select_box_ul  select_task">
                <li class="select_active" tasktype='all'>所有任务</li>
                <li tasktype='finished'>已完成的任务</li>
                <li tasktype='unfinished'>未完成的任务</li>
            </ul>
            <div class="nav_demo_bottom"></div>
        </div>
        <div class="thumb" id="thumb3">
            <span>日程</span>
            <div class="nav_right_bottom"></div>
        </div>
        <div class="thumb" id="thumb4">
            <span>文件</span>
            <div class="nav_right_bottom"></div>
            <div class="nav_demo_select nav_demo_select_last"><span>我创建的文件</span><i class="layui-icon icon_sty">&#xe61a;</i></div>
            <ul class="select_box_ul nav_demo_select_last">
                <li class="select_active">我创建的文件</li>
                <li>word文件</li>
                <li>Excel文件</li>
                <li>PPT文件</li>
            </ul>
            <div class="nav_demo_bottom"></div>
        </div>
    </div>
    <div class="swiper-wrapper bg">
        <div class="swiper-slide">
            <div class="container">
                <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1">
                    <defs>
                        <symbol id="icon-ok" viewBox="0 0 39 32">
                            <title>ok</title>
                            <path class="path1" d="M14.084 20.656l-7.845-9.282c-1.288-1.482-3.534-1.639-5.016-0.351s-1.639 3.534-0.351 5.016l10.697 12.306c1.451 1.669 4.057 1.623 5.448-0.096l18.168-22.456c1.235-1.527 0.999-3.765-0.528-5.001s-3.765-0.999-5.001 0.528l-15.573 19.337z"></path>
                        </symbol>
                    </defs>
                </svg>
                <!--                    <div class="nav">-->
                <!--                        <div class="nav_demo active">-->
                <!--                            <span>近期</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>任务</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>日程</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>文件</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                    </div>-->
                <div class="content">
                    <!--
                        <div class="content_box">
                            <div class="content_box_title">今天的事</div>
                            <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time">12月10日   上午10:00截止</div>
                            </div>
                        </div>
                        <div class="content_box">
                            <div class="content_box_title">昨天的事</div>
                            <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time">12月101日   上午10:00截止</div>
                            </div>
                            <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                                 <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                                 <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                                 <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                                 <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                                 <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>  <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>  <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>  <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>
                              <div class="content_box_news">
                                <div class="content_box_news_icon">
                                    <a href="javascript:void 0" class="item-check-btn check">
                                        <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                    </a>
                                </div>
                                <div class="content_box_news_title">这是任务的名字</div>
                                <div class="content_box_news_time"></div>
                            </div>

                        </div> -->
                </div>
            </div>
        </div>
        <div class="swiper-slide task">
            <div class="container1">
                <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1">
                    <defs>
                        <symbol id="icon-ok" viewBox="0 0 39 32">
                            <title>ok</title>
                            <path class="path1" d="M14.084 20.656l-7.845-9.282c-1.288-1.482-3.534-1.639-5.016-0.351s-1.639 3.534-0.351 5.016l10.697 12.306c1.451 1.669 4.057 1.623 5.448-0.096l18.168-22.456c1.235-1.527 0.999-3.765-0.528-5.001s-3.765-0.999-5.001 0.528l-15.573 19.337z"></path>
                        </symbol>
                    </defs>
                </svg>
                <!--                    <div class="nav">-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>近期</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo active">-->
                <!--                            <span>任务</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                            <div class="nav_demo_select"><span>所有任务</span><i class="layui-icon icon_sty">&#xe61a;</i></div>-->
                <!--                            <ul class="select_box_ul  select_task">-->
                <!--                                <li class="select_active" tasktype='all'>所有任务</li>-->
                <!--                                <li tasktype='finished'>已完成的任务</li>-->
                <!--                                <li tasktype='unfinished'>未完成的任务</li>-->
                <!--                            </ul>-->
                <!--                            <div class="nav_demo_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>日程</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>文件</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                    </div>-->
                <div class="content">
                    <div class="scroll">

                    </div>

                    <!--

                    <div class="content_box">
                        <div class="content_box_title">任务1</div>
                        <div class="content_box_news">
                            <div class="content_box_news_icon">
                                <a href="javascript:void 0" class="item-check-btn check">
                                    <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                </a>
                            </div>
                            <div class="content_box_news_title">这是任务的名字</div>
                            <div class="content_box_news_time">12月10日   上午10:00截止</div>
                        </div>
                    </div>
                    <div class="content_box">
                        <div class="content_box_title">任务2</div>
                        <div class="content_box_news">
                            <div class="content_box_news_icon">
                                <a href="javascript:void 0" class="item-check-btn">
                                    <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                </a>
                            </div>
                            <div class="content_box_news_title">这是任务的名字</div>
                            <div class="content_box_news_time">12月101日   上午10:00截止</div>
                        </div>
                        <div class="content_box_news">
                            <div class="content_box_news_icon">
                                <a href="javascript:void 0" class="item-check-btn check">
                                    <svg class="icon icon-ok"><use xlink:href="#icon-ok"></use></svg>
                                </a>
                            </div>
                            <div class="content_box_news_title">这是任务的名字</div>
                            <div class="content_box_news_time"></div>
                        </div>
                    </div>-->
                </div>
            </div>
        </div>
        <div class="swiper-slide">
            <div class="t_body">
                <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1">
                    <defs>
                        <symbol id="icon-ok" viewBox="0 0 39 32">
                            <title>ok</title>
                            <path class="path1" d="M14.084 20.656l-7.845-9.282c-1.288-1.482-3.534-1.639-5.016-0.351s-1.639 3.534-0.351 5.016l10.697 12.306c1.451 1.669 4.057 1.623 5.448-0.096l18.168-22.456c1.235-1.527 0.999-3.765-0.528-5.001s-3.765-0.999-5.001 0.528l-15.573 19.337z"></path>
                        </symbol>
                    </defs>
                </svg>
                <!--                    <div class="nav">-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>近期</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>任务</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo active">-->
                <!--                            <span>日程</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>文件</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                    </div>-->
                <div class="date">
                    <div class="site-demo-laydate">
                        <div class="layui-inline" id="test-n1"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="swiper-slide">
            <div class="container">
                <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1">
                    <defs>
                        <symbol id="icon-ok" viewBox="0 0 39 32">
                            <title>ok</title>
                            <path class="path1" d="M14.084 20.656l-7.845-9.282c-1.288-1.482-3.534-1.639-5.016-0.351s-1.639 3.534-0.351 5.016l10.697 12.306c1.451 1.669 4.057 1.623 5.448-0.096l18.168-22.456c1.235-1.527 0.999-3.765-0.528-5.001s-3.765-0.999-5.001 0.528l-15.573 19.337z"></path>
                        </symbol>
                    </defs>
                </svg>
                <!--                    <div class="nav">-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>近期</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>任务</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo">-->
                <!--                            <span>日程</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                        </div>-->
                <!--                        <div class="nav_demo active">-->
                <!--                            <span>文件</span>-->
                <!--                            <div class="nav_right_bottom"></div>-->
                <!--                            <div class="nav_demo_select nav_demo_select_last"><span>我创建的文件</span><i class="layui-icon icon_sty">&#xe61a;</i></div>-->
                <!--                            <ul class="select_box_ul nav_demo_select_last">-->
                <!--                                <li class="select_active">我创建的文件</li>-->
                <!--                                <li>word文件</li>-->
                <!--                                <li>Excel文件</li>-->
                <!--                                <li>PPT文件</li>-->
                <!--                            </ul>-->
                <!--                            <div class="nav_demo_bottom"></div>-->
                <!--                        </div>-->
                <!--                    </div>-->
                <div class="content">
                    <div class="content_space"></div>
                    <div class="content_file">
                        <img class="content_file_logo" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_01.png';?>" alt="">
                        <div class="content_file_text">这是一个Word文件的一个名字.doc</div>
                        <img class="content_file_down" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_05.png';?>" alt="">
                    </div>
                    <div class="content_file">
                        <img class="content_file_logo" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_02.png';?>" alt="">
                        <div class="content_file_text">这是一个Excel文件的一个名字.xlsx</div>
                        <img class="content_file_down" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_05.png';?>" alt="">
                    </div>
                    <div class="content_file">
                        <img class="content_file_logo" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_03.png';?>" alt="">
                        <div class="content_file_text">这是一个图片文件的一个名字.png</div>
                        <img class="content_file_down" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_05.png';?>" alt="">
                    </div>
                    <div class="content_file">
                        <img class="content_file_logo" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_04.png';?>" alt="">
                        <div class="content_file_text">这是一个ppt文件的一个名字.ppt</div>
                        <img class="content_file_down" src="<?php echo $config->webRoot . 'theme/default/images/mweb/mine_05.png';?>" alt="">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<script type="text/javascript">
    var type = 'recently';
    var page = 1;

    var bannerSwiper = new Swiper('#banner', {
        mousewheel: true,//鼠标滚轮切换
        effect: 'coverflow',//slide切换效果
        speed: 300,
        watchSlidesProgress: true,//表示进程，index
        on: {
            touchMove: function() {
                progress = this.progress
                // console.log(progress);
                for (i = 0; i < this.slides.length; i++) {
                    slideProgress = this.slides[i].progress
                    if (Math.abs(slideProgress) < 1) {
                        thumbSwiper[i].setTranslate(thumbSwiper[i].width * (Math.abs(slideProgress) - 1))
                    }
                }
            },
            transitionStart: function() {
                activeIndex = this.activeIndex
                if(activeIndex == 0){
                    type='recently';
                }

                if(activeIndex == 1){
                    type='task';
                }

                if(activeIndex == 2){
                    type='calendar';
                }

                if(activeIndex == 3){
                    type='document';
                }

                $('.scroll').empty();

                page=1;


                getdata();

                for (i = 0; i < thumbSwiper.length; i++) {
                    if (i == activeIndex) {
                        let b_width=$(".active>span").width();
                        $(".thumb-list>.thumb").eq(activeIndex).addClass('active').siblings().removeClass('active');
                        $(".active>.nav_right_bottom").width(b_width);
                        $($('.thumb-list>.thumb').eq(activeIndex).children('.nav_demo_select')).show();
                    } else {
                        $($('.thumb-list>.thumb').eq(activeIndex-1).children('.nav_demo_select')).hide();
                        $($('.thumb-list>.thumb').eq(activeIndex+1).children('.nav_demo_select')).hide();
                    }
                }

//                for (i = 0; i < thumbSwiper.length; i++) {
//                    if (activeIndex == 1) {
////                        thumbSwiper[i].slideTo(1);
//                        $(".active>.nav_right_bottom").width(b_width);
//                        $(".thumb-list>.thumb").eq(activeIndex).addClass('active').siblings().removeClass('active');
//                        $($('.thumb-list>.thumb').eq(activeIndex).children('.nav_demo_select')).show();
//                    } else if(activeIndex == 2){
//                        thumbSwiper[i].slideTo(1);
//                        $(".active>.nav_right_bottom").width(b_width);
//                        $(".thumb-list>.thumb").eq(activeIndex).addClass('active').siblings().removeClass('active')
//                    }else if(activeIndex == 3){
//                        thumbSwiper[i].slideTo(1);
//                        $(".active>.nav_right_bottom").width(b_width);
//                        $(".thumb-list>.thumb").eq(activeIndex).addClass('active').siblings().removeClass('active')
//                        $($('.thumb-list>.thumb').eq(activeIndex).children('.nav_demo_select')).show();
//                    }else if(activeIndex == 0){
//                        thumbSwiper[i].slideTo(1);
//                        $(".active>.nav_right_bottom").width(b_width);
//                        $(".thumb-list>.thumb").eq(activeIndex).addClass('active').siblings().removeClass('active')
//                    }else if(activeIndex != 1){
//                        $($('.thumb-list>.thumb').eq(1).children('.nav_demo_select')).hide();
//                    }
//                }
            },
        }
    });
    var thumbSwiper = new Swiper('.thumb', {
        watchSlidesProgress: true,
        effect: 'cube',
        touchRatio: 0,
        cubeEffect: {
            shadow: false,
        },
        on: {
            tap: function() {
                bannerSwiper.slideTo(this.$el.index());
            },
        },
    });
    //    thumbSwiper[0].slideTo(1, 0)
</script>


<script>
    //banner下划线
    let b_width=$(".active>span").width();
    window.onload=function () {
        $(".active>.nav_right_bottom").width(b_width);
        $(".content_box div:last-child>.content_box_news_time").css('border-bottom','none')
    };
    //    $(".nav_demo").click(function () {
    //        var i=$(this).index()
    //        console.log(i);
    //        $(this).addClass('active').siblings().removeClass('active')
    //        $(".active>.nav_right_bottom").width(b_width);
    //    });

    //多选框
    // $(".item-check-btn").click(function () {
    //     if($(this).hasClass('check')){
    //         $(this).removeClass('check')
    //     }else {
    //         $(this).addClass('check')
    //     }
    // });


    $('.content').on('click', '.item-check-btn', function(event) {
        event.preventDefault();
        if($(this).hasClass('check')){
            $(this).removeClass('check')
        }else {
            $(this).addClass('check')
        }

    });


    //下拉菜单
    $(".nav_demo_select").click(function () {
        $($(this).siblings(".select_box_ul")).slideToggle('fast');
    })
    var val=$(".nav_demo_select").html;
    $(".select_box_ul>li").click(function () {
//        var i=this.index();
        $(this).addClass("select_active").siblings().removeClass("select_active");
//        alert($(".select_box").html())
        $(".nav_demo_select>span").html($(this).html());
        $(".select_box_ul").slideUp('fast');
        $('.scroll').empty();
        page = 1;
        getdata();
//        $('#cate').val($('.select_box_ul .active').attr('cate_id'));
//        ajax_get_table('search-form',1);
    })



    function getdata(){
        load= layer.load(2);
        if(type=='task'){
            var tasktype= $('.select_task').find('.select_active').attr('tasktype');
            var url='<?php echo $this->createLink("mweb","task"); ?>'+'&type='+tasktype+'&pageID='+page;
            $.ajax({
                url:url,
                type:'get',

                success:function(data){

                    layer.close(load);
                    patt=/\S/;
                    if(patt.test(data)){

                        $.each($(data).find('.content_box_news_title'), function(index, val) {

                            if($('.task .content .scroll '+'#'+$(this).attr('id')).length <= 0 ){

                                $(this).parents('.content_box').appendTo('.task .content .scroll');

                            }

                        });

                        page++;
                    }
                }

            })
        }

    }


    var slide= function(dom,callup,calldown){
        var  startX=0;
        var  distence=0;
        var  ismove = false;

        dom.addEventListener('touchstart',function(e){
            startY= e.touches[0].clientY;  //开始的位置
        })

        dom.addEventListener('touchmove',function(e){
            ismove= true;

            distence= e.touches[0].clientY-startY; //移动过程中的位置差
        })

        dom.addEventListener('touchend',function(e){
            if(ismove){
                abs=Math.abs(distence);
                if(abs >= 50){ //要超过50px距离才算移动
                    if(distence < 0){
                        callup && callup.call(this,e);  //如果这里传this 代表传的是这个dom 对象，不传代表的是windows
                    }else{
                        calldown && calldown.call(); //这个就没传this
                    }
                }
            }
            //回归原始状态
            startX=0;
            distence=0;
            ismove=false;
        })


    }



    slide(document.querySelector('.task .content'),function(){
        getdata();
    })
</script>

<!--日程-->
<script>


    var time = new Date();
    var month= time.getFullYear()+'/'+(time.getMonth()+1); //默认当前月
    var marks={};


    //获取所有的培训
    $.ajax({
        url:'{:U("marks")}',
        type:'get',
        async:false,
        success:function(data){
            marks=data;
        }
    })




    layui.use(['laydate','layer'], function(){
        var laydate = layui.laydate;
        layer = layui.layer;


        //直接嵌套显示
        laydate.render({
            elem: '#test-n1'
            ,theme: 'grid'
            ,position: 'static'
            ,showBottom: false
            ,change: function(value, date){
                month=date.year+'/'+date.month;
                getdata(month);

                $('.layui-this').addClass('now');
                $('.layui-this').removeClass('layui-this');

            }
            ,mark: marks
            ,ready: function(date){
                $('.layui-this').addClass('now');
                $('.layui-this').removeClass('layui-this');
            }
            ,click:function(){

            }
        });
    });






    function getdata(month){

        load=layer.load(2);
        var url='{:U("ajaxmonthplan")}'+'&month='+month;
        $.ajax({
            url:url,
            type:'get',
            async:false,
            dataType:'json',
            success:function(data){

                // console.log(data);
                // $.each(data.model, function(index, val) {
                //       // console.log(val.date);
                //        marks[val.date]=' ';
                //  });

                var allurl= '{:U("myalltrain")}'+'&month='+data.month;
                var finishedurl='{:U("finished")}'+'&month='+data.month;
                var unfinishedurl='{:U("unfinished")}'+'&month='+data.month;

                $('.finished').text(data.finished);
                $('.unfinished').text(data.unfinished);
                $('.all').text(data.all);
                $('.all').parents('a').attr({
                    href: allurl

                });
                $('.finished').parents('a').attr({
                    href: finishedurl

                });
                $('.unfinished').parents('a').attr({
                    href: unfinishedurl

                });


                // console.log(mark);
                layer.close(load);
            }
        })

    }




    $('.layui-laydate-content').on('touchstart', 'td', function(event) {

        var day=$(this).attr('lay-ymd');
        var url='{:U("dayplan")}'+'&day='+day;
        var span= $(this).find('span');
        if(span.length >= 1){
            window.location.href=url;
        }

    });


</script>
</html>